package hczc.longcai.com.hccrowdfunding.home.fourth_mine.activities;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ListView;
import android.widget.TextView;

import java.util.ArrayList;
import java.util.List;

import hczc.longcai.com.hccrowdfunding.R;
import hczc.longcai.com.hccrowdfunding.activity.BaseActivity;
import hczc.longcai.com.hccrowdfunding.home.first_index.adapters.IndexHotAdapter;
import hczc.longcai.com.hccrowdfunding.home.first_index.beans.IndexHotRecommend;
import hczc.longcai.com.hccrowdfunding.home.first_index.beans.ProjectInfo;
import hczc.longcai.com.hccrowdfunding.utils.bitmaputils.ImageLoader;

/**
 * 关注项目
 */
public class AttentionProjectActivity extends BaseActivity implements View.OnClickListener {

    private List<ProjectInfo> list;
    private ListView listView;
    private IndexHotAdapter adapter;
    private ImageLoader imageLoader;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_attention_project);

        imageLoader = new ImageLoader(this);

        initDatas();
        initViews();
    }

    private void initDatas() {
        list = new ArrayList<>();


    }

    private void initViews() {
        findViewById(R.id.head_back).setOnClickListener(this);
        ((TextView) findViewById(R.id.head_title)).setText("关注项目");
        listView = ((ListView) findViewById(R.id.mine_attention_project_listview));
        adapter = new IndexHotAdapter(this,list,imageLoader);
        listView.setAdapter(adapter);

    }

    @Override
    public void onClick(View v) {
        int id = v.getId();
        switch (id){
            case R.id.head_back:
                finish();
                break;
        }
    }
}
